﻿using System;
using System.Linq.Expressions;
using IterationLife.Extensions.EasyUI.Commons;
using Util.Ui.Forms.ComboTrees;

namespace IterationLife.Extensions.EasyUI {
    /// <summary>
    /// 业务控件
    /// </summary>
    public interface IBusinessControl<T> {
        /// <summary>
        /// 表格列业务控件
        /// </summary>
        IBusinessGridColumn<T> GridColumn();
        /// <summary>
        /// 字典控件
        /// </summary>
        /// <param name="name">控件name属性</param>
        /// <param name="code">字典编码</param>
        /// <param name="value">字典Id</param>
        IComboTree Dictionary( string name, string code, string value = "" );
        /// <summary>
        /// 字典控件
        /// </summary>
        /// <param name="expression">对象属性表达式</param>
        /// <param name="code">字典编码</param>
        IComboTree Dictionary<TProperty>( Expression<Func<T, TProperty>> expression, string code );
        /// <summary>
        /// 地区控件
        /// </summary>
        IAreaControl<T> Area();
        /// <summary>
        /// 附件控件
        /// </summary>
        IAttachmentControl<T> Attachment();
        /// <summary>
        /// 在线HTML编辑器
        /// </summary>
        IUeditorControl<T> Ueditor();
    }
}
